package io.kiki.sba.registry.core.model;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

@Setter
@Getter
public class BaseRegister implements Serializable {

    private static final long serialVersionUID = 1L;

    private String instanceId;

    private String zone;

    private String appName;

    private String dataId;

    private String group;


    private String processId;

    private String registId;

    private String clientId;

    private String dataInfoId;

    private String ip;


    private Integer port;

    private String eventType;

    private Long version;


    private Long timestamp;

    private volatile Map<String, String> attributes;


    public synchronized Map<String, String> getAttributes() {
        if (this.attributes == null) {
            this.attributes = new HashMap<String, String>();
        }
        return attributes;
    }


    public synchronized void setAttributes(Map<String, String> attributes) {
        this.attributes = attributes;
    }


}
